package com.matt.domain;

import com.matt.commons.model.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@Table(name = "liveroom_record")
public class LiveRoomRecord extends Model {

    @Column(columnDefinition = " varchar(32) COMMENT '用户id' ")
    private String userId;

    @Column(columnDefinition = " varchar(32) COMMENT 'liveroomid摄像头id' ")
    private String liveRoomId;

    @Column(columnDefinition = " varchar(32) COMMENT '客户端id' ")
    private String clientId;

    @Column(columnDefinition = " bigint(20) default 0 COMMENT '直播时长' ")
    private long time;

    @Column(columnDefinition = " varchar(32) COMMENT 'ip' ")
    private String ip;

    @Column(columnDefinition = " date COMMENT '日期' ")
    private Date date;

    @Column(columnDefinition = " datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间' ")
    private Date lastModify;

    @Column(columnDefinition = " datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' ")
    private Date created = new Date();
}
